<template>
  <div class="detailed-list-title" v-if="title">
    <div class="title">{{ title }}</div>
    <div class="count-text" v-if="text">
      {{ text }}
    </div>
    <div class="btn" v-if="rightText" @click.stop="$toast(api.msg)">{{ rightText }}</div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: ["title", "text", "rightText"],
};
</script>

<style lang="scss" scoped>
.detailed-list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.15rem;
  color: var(--text-green);
  margin: 0.18rem 0 0.1rem 0;
  > div {
    height: 100%;
  }
  .title {
    margin: 0;
    font-size: 0.2rem;
    font-weight: bold;
    color: var(--text-black);
  }
  .count-text {
    height: 100%;
    margin-left: 0.1rem;
    margin-right: auto;
  }
}
</style>